class Student(object):
    # 属性---类属性，实例属性
    count1 = 0  # 类属性  # stu1操作count1+1=1

    @staticmethod
    def menu(age):
        # 工具函数
        book = [{'id': 1, 'book_name': '数学', 'zuozhe': '宋浩', 'cbs': '人民出版社', 'money': '30', 'cb_time': '2008'},
                {'id': 2, 'book_name': '化学', 'zuozhe': '宋浩', 'cbs': '人民出版社', 'money': '30', 'cb_time': '2008'}
                ]
        age += 1
        print("图书管理系统", age)

    # stu2操作count1+1=2
    def __init__(self, name, age):
        # 实例属性
        self.name = name
        self.age = age
        self.count2 = 0

        # 方法

    @classmethod
    def add1(cls):
        print(cls)
        # cls ---表示当前类本身
        cls.count1 += 1
        print(cls.count1)

    def add2(self):
        self.count2 += 1
        print(self.count2)


# Student.menu()

stu1 = Student('小王', 18)
stu1.menu(20)

# stu1.add1()  # 1
# stu1.add1()  # 2
# stu1.add1()  # 3
# # stu1.add2()
stu2 = Student('小红', 18)
stu2.menu(22)
# stu2.add1()  # 4
# stu2.add1()  # 5
# stu2.add1()  # 6
# # stu2.add2()
# print("stu2.count1:", stu2.count1)
# print("stu1.count1:", stu1.count1)
